package com.wxzz.elearing.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.wxzz.elearing.user.dto.AdminRoleDto;
import com.wxzz.elearing.user.dto.AdminRolePermissionDto;
import com.wxzz.elearing.user.entity.AdminPermission;
import com.wxzz.elearing.user.entity.AdminRole;
import com.wxzz.elearing.user.entity.AdminUser;
import com.wxzz.elearing.user.entity.AdminUserRole;
import com.wxzz.elearning.common.vo.JgPageVo;
import com.wxzz.elearning.common.vo.ReturnVO;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author
 * @since 2021-03-11
 */
public interface IAdminRoleService extends IService<AdminRole> {

    /**
     * 添加角色
     *
     * @param adminRole
     * @return
     */
    ReturnVO saveAdminRole(AdminRole adminRole);

    /**
     * 修改角色信息
     *
     * @param adminRole
     * @return
     */
    ReturnVO updateAdminRole(AdminRole adminRole);

    /**
     * 删除角色
     *
     * @param adminRoleId
     * @return
     */
    ReturnVO deleteAdminRole(Long adminRoleId);

    /**
     * 角色列表
     *
     * @param enterpriseId
     * @param adminRoleDto
     * @return
     */
    ReturnVO<JgPageVo<List<AdminRole>>> listAdminRole(HttpServletResponse response,Long enterpriseId, AdminRoleDto adminRoleDto);

    /**
     * 给用户分配角色
     *
     * @param adminUserRole
     * @return
     */
    ReturnVO updateAdminUserRole(Long enterpriseId, AdminUserRole adminUserRole);

    /**
     * 给角色分配权限
     *
     * @param adminRolePermissionDto
     * @return
     */
    ReturnVO updateAdminRolePermission(AdminRolePermissionDto adminRolePermissionDto);

    /**
     * 添加讲师角色
     *
     * @param adminUserId
     * @param enterpriseId
     */
    void addTeacherRole(Long adminUserId, Long enterpriseId);

    /**
     * 添加试讲讲师角色
     *
     * @param adminUserId
     * @param enterpriseId
     */
    void addTrialTeacherRole(Long adminUserId, Long enterpriseId);
}
